package com.example.test.model.json_analyzer;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import com.example.test.model.CommonFunc;
import com.tencent.weibo.sdk.android.model.GlobalVar;

import android.R.string;
import android.util.Log;
import android.widget.SimpleAdapter;

public class HashDataProcessor {
	 public static void CommentDataProcess( List<HashMap<String, String>> lsHasTimeline)
	  {
		  if(lsHasTimeline!=null)
		  {
		  for (HashMap<String, String> map : lsHasTimeline) {
			map.put("timestamp",CommonFunc.FromSinaDateToStamp(map.get("created_at")));
			map.put("created_at",CommonFunc.FromSinaDateTo(map.get("created_at"), "MM-dd HH:mm"));
			map.put("source","来自"+CommonFunc.translateSinaSource(map.get("source")));
		    map.put("statususername","回复 "+map.get("statususername")+" 的微博：");
		    }
		  }
	  }
	 
  public static void timelineDataProcess( List<HashMap<String, String>> lsHasTimeline)
  {
	  if(lsHasTimeline!=null)
	  {
	  for (HashMap<String, String> map : lsHasTimeline) {
		  if(map.get("resource")=="QQ")
		  {
			String token =GlobalVar.QQToken; 
		  }
		  map.put("timestamp",CommonFunc.FromSinaDateToStamp(map.get("created_at")));
		map.put("created_at",CommonFunc.FromSinaDateTo(map.get("created_at"), "MM-dd HH:mm"));
		map.put("source","来自"+CommonFunc.translateSinaSource(map.get("source")));
		map.put("reposts_count","转发（"+map.get("reposts_count")+"）");
		map.put("comments_count","评论（"+map.get("comments_count")+"）");
		map.put("attitudes_count","赞（"+map.get("attitudes_count")+"）");
	    }
	  }
  }
 
  
	  }
